package com.allen.imsystem.user.model.pojo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserInfo对象", description="用户信息表")
public class UserInfo implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "uid", type = IdType.NONE)
    @ApiModelProperty(value = "用户账号")
    private String uid;

    @ApiModelProperty(value = "用户昵称")
    private String username;

    @ApiModelProperty(value = "用户头像的唯一标识id，由此从磁盘中找到用户头像文件")
    private String avatar;

    @ApiModelProperty(value = "性别，0->女，1->男")
    private Integer gender;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "个性签名，30字以内")
    @TableField("`desc`")
    private String desc;

    @ApiModelProperty(value = "省-市 二级联动地区信息，待完善")
    private Integer regionId;

    @ApiModelProperty(value = "创建时间，在此表相当于注册时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "最后一次修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public UserInfo() {
    }

    public UserInfo(String uid,String username) {
        this.uid = uid;
        this.username = username;
    }
}
